/*
 * 地址选择
 */
'use strict';
import React, { Component } from 'react';
import {
    StyleSheet,
    Text,
    View,
    TouchableHighlight,
    Image,
    PixelRatio,
    AsyncStorage,
    TextInput,
} from 'react-native';


import Toast from 'antd-mobile/lib/toast';
import List from 'antd-mobile/lib/list';
import SearchBar from 'antd-mobile/lib/search-bar';

import NavTitle from '../component/NavTitle';

import SearchList from './SearchList';

class SearchPro extends Component {
    constructor(props) {
        super(props)
        this.state = {

        }
    }

    componentDidMount(){

    }

    _search(val){
        this.props.navigator.push({
            name:'SearchList',
            component:SearchList,
            params:{
                value:val
            }
        })
    }

    render() {
        return (
            <View style={styles.container}>
                <NavTitle
                    title='搜索'
                    leftButton = {true}
                    leftText = {'返回'}
                    leftImg = {require('../imgs/left.png')}
                    leftHander = {()=>{this.props.navigator.pop()}}
                    headColor = '#fbdc3a'
                />
                <View style={styles.content}>
                    <SearchBar placeholder="搜索" onSubmit={this._search.bind(this)}/>
                </View>
            </View>
        )
    }

}

const styles = StyleSheet.create({
    container: {
        backgroundColor: '#EEEEEF',
        flex: 1,
    },
    content:{
        marginTop:10,
    },
});

export default SearchPro;
